import { h,ref } from "../../lib/guide-leo-vue.esm.js"
import Child from "./Child.js"
export default {
    setup() {
        const msg = ref('123')
        const count = ref(1)
        const changeMsg = () => {
            msg.value = '456'
        }
        const changeCount = () => {
            count.value++
        }           
        return {
            msg,count,changeMsg,changeCount
        }    
    },
    render() {
        return h('div',{},[
            h('div',{},'你好'),
            h('button',{ onClick:this.changeMsg },"change child message"),
            h(Child,{ msg:this.msg }),
            h('button',{ onClick:this.changeCount },"change child count"),
            h('div',{},String(this.count)),
        ])
    },

}